#import "ZealZealotController.h"
        
#import "ZealZealotModel.h"
#import "ZealZealotCell.h"
#import "Masonry.h"

@interface ZealZealotController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *elevateJoyousTableView;
@property (nonatomic, strong) NSMutableArray *flexibilityXenophileDatas;

@end

@implementation ZealZealotController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self sereneInitui];
	[self dreamerThriveDelightrequestData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)flexibilityXenophileDatas {
	if (!_flexibilityXenophileDatas) {
		_flexibilityXenophileDatas = [NSMutableArray array];
	}
	return _flexibilityXenophileDatas;
}

- (void)sereneInitui {
    self.elevateJoyousTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.elevateJoyousTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.elevateJoyousTableView.estimatedRowHeight = 0;
    self.elevateJoyousTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.elevateJoyousTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.elevateJoyousTableView.delegate = self;
    self.elevateJoyousTableView.dataSource = self;
	self.elevateJoyousTableView.rowHeight = 98;
    self.elevateJoyousTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.elevateJoyousTableView.showsVerticalScrollIndicator = NO;
    self.elevateJoyousTableView.showsHorizontalScrollIndicator = NO;
    self.elevateJoyousTableView.backgroundColor = UIColor.clearColor;
    [self.elevateJoyousTableView registerClass:[ZealZealotCell class] forCellReuseIdentifier:NSStringFromClass([ZealZealotCell class])];
    [self.view addSubview:self.elevateJoyousTableView];
    [self.elevateJoyousTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

//: 获取数据模型
- (void)dreamerThriveDelightrequestData {
	
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.flexibilityXenophileDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ZealZealotCell *laughButterflyPeaceful = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([ZealZealotCell class])];
    if (laughButterflyPeaceful == nil) {
        laughButterflyPeaceful = [[ZealZealotCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([ZealZealotCell class])];
    }
    laughButterflyPeaceful.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return laughButterflyPeaceful;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
